const express = require('express')
const router = express.Router()
const userInfoHandle = require('./handle')
const expressJoi = require("@escook/express-joi")
const { update_userinfo_schema } = require('../../schema/user')
const multipart = require('connect-multiparty')
const multipartMiddleware = multipart()
// 获取用户信息
router.get('/userInfo', userInfoHandle.getUserInfo)
router.post('/userInfo', [expressJoi(update_userinfo_schema), multipartMiddleware], userInfoHandle.updateUserInfo)
module.exports = router